//
//  NewsTitle.m
//  19-JSON-WYNews
//
//  Created by Snow on 16/8/9.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "NewsTitle.h"

@implementation NewsTitle
- (instancetype)initWithDic:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"template"]) {
        [self setValue:value forKey:@"news_template"];
    }
}
- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}
+ (NewsTitle *)newsTitleWithDic:(NSDictionary *)dictionary
{
    return [[self alloc] initWithDic:dictionary];
}
@end
